﻿/*
 * BFind - A tool for finding football matches for trading on Betfair
 * Copyright 2009, 2010 Magnus Olsson <magols72(at)gmail.com>
 * 
 * This file is part of BFind.
 * 
 * BFind is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * BFind is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with BFind.  If not, see <http://www.gnu.org/licenses/>
*/


namespace betfairfind.Rules
{
    public class BaseRule
    {

        protected string[] MarketsUsedInside;

        public BaseRule()
        {

        }


        protected bool CheckRequiredMarkets()
        {
            bool isOk = true;

            foreach (var m in MarketsUsedInside)
            {
                if (!FindSoccerGames.marketnames.Contains(m))
                {
                    Logger.Log("CONFIG ERROR! Markettype \"" + m + "\" not included in fetch. Edit your config file.", true, true);
                    isOk = false;
                }

                
            }

            return isOk;
        }





    }
}
